/**
 *
 */
package com.newhero.product.common.shiro;

import java.io.Serializable;
import java.util.Set;

/**
 * @ClassName: ShiroUser 
 * @Description: 自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息
 * @author Caolj 648198687@qq.com 
 * @date 2017-3-15 下午3:42:17
 */
public class ShiroUser implements Serializable {
    private static final long serialVersionUID = -1373760761780840081L;
    
    private String userID;
    private final String userLoginName;
    private String userName;
    
    private String organID;
    private String organName;
    
    private Set<String> urlSet;
    private Set<String> roleSet;

    public ShiroUser(String userLoginName) {
        this.userLoginName = userLoginName;
    }

    public ShiroUser(String userID, String userLoginName, String userName ) {
        this.userID = userID;
        this.userLoginName = userLoginName;
        this.userName = userName;
    }

    public String getOrganID() {
		return organID;
	}

	public void setOrganID(String organID) {
		this.organID = organID;
	}

	public String getOrganName() {
		return organName;
	}

	public void setOrganName(String organName) {
		this.organName = organName;
	}

	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Set<String> getUrlSet() {
		return urlSet;
	}

	public void setUrlSet(Set<String> urlSet) {
		this.urlSet = urlSet;
	}

	public Set<String> getRoleSet() {
		return roleSet;
	}

	public void setRoleSet(Set<String> roleSet) {
		this.roleSet = roleSet;
	}

	public String getUserLoginName() {
		return userLoginName;
	}

	/**
     * 本函数输出将作为默认的<shiro:principal/>输出.
     */
    @Override
    public String toString() {
        return this.userName;
    }
}